import { useCanvasStore } from '@/store/modules/canvasStore'
const canvasStore = useCanvasStore()
export function canvasD(ctx: any, x: number, y: number) {
  var bbox

  bbox = canvasStore.canvas.getBoundingClientRect()
  console.log(bbox)
  return {
    x: (x - bbox.left) * (ctx.width / bbox.width),
    y: (y - bbox.top) * (ctx.height / bbox.height),
  }
}
